/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package nl.hanze.monoalphabetic.ui;

import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.JTabbedPane;
import nl.hanze.monoalphabetic.controller.MainController;

/**
 *
 * @author alex
 */
class MainScreen extends JFrame {
    MainController mainController;

    public MainScreen(MainController mainController) {
        this.mainController = mainController;
        
        setSize(1250, 768);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
        int w = dim.getSize().width;
        int h = dim.getSize().height;
        setLocation((w - 1250) / 2, (h - 768) / 2);

        addTabs();
        setVisible(true);
    }

    private void addTabs() {
        JTabbedPane pane = new JTabbedPane();
        pane.addTab("Importeer referentie", new ImportPanel(mainController));
        pane.addTab("Codeer", new EncryptionPanel(mainController));
        pane.addTab("Analyseer", new AnalyzePanel(mainController));
        add(pane);
    }
}
